package com.testjpa.web;

import com.testjpa.api.TestClientApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 作者: LCG
 * 日期: 2020/5/19 17:28
 * 描述:
 */

@RestController
public class TestOpenFeignController {

    @Autowired
    private TestClientApi testClientApi;

    @RequestMapping("test06/{id}")
    public String test06(@PathVariable("id") String id){

        Map<String,Object> map=new HashMap<String,Object>();
        map.put("id",id);
        map.put("ok","===参数====");

        //调用consul-client2中的接口
        String result = testClientApi.test05(map);

        return result;
    }

}
